package com.bootssm.service.impl;

import com.bootssm.dao.UserMapper;
import com.bootssm.pojo.User;
import com.bootssm.pojo.UserVO;
import com.bootssm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> findAll(UserVO userVO) {
        return userMapper.findAll(userVO);//查询用户表
    }

    @Override
    public Integer getCount(UserVO userVO) {
        return userMapper.getCount(userVO);
    }

    @Override
    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public User findById(String userId) {
        return userMapper.findById(userId);
    }

    @Override
    public void deleteUser(String userId) {
        userMapper.deleteUser(userId);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public int login(User user) {
        //更新测试
       return userMapper.login(user);
    }
}
